<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="{DT_CHARSET}">
	<title>{if $seo_title}{$seo_title}{else}{if $head_title}{$head_title}{$DT[seo_delimiter]}{/if}{if $city_sitename}{$city_sitename}{else}{$DT[sitename]}{/if}{/if}</title>
	<script src="{JS_URL}global.js"></script>
	<script src="{JS_URL}libs/seajs/2.2.0/seajs.js"></script>
	<script src="{JS_URL}libs/config.js"></script>
	<style type="text/css">html{_overflow-y:scroll}</style>
    <link rel="stylesheet" href="{CSS_URL}common.css"/>
	<link rel="stylesheet" href="{CSS_URL}multiUpload/multi.css"/>
	<link rel="stylesheet" href="{JS_URL}module/multiUpload/swfupload.css"/>
</head>
<body>
<div class="pad-10">
	<div class="col-tab">
		<ul class="tabBut cu-li">
			<li id="tab_swf_1" class="on">上传附件</li>
		</ul>
		<div id="div_swf_1" class="content pad-10 ">
			<div>
				<div class="addnew" id="addnew">
					<span id="buttonPlaceHolder"></span>
				</div>
				<input type="button" id="btupload" value="开始上传">
				<div id="nameTip" class="onShow">最多上传<font color="red"> 10</font> 个附件,单文件最大 <font color="red">2 MB</font></div>
				<div class="bk3"></div>
				<div class="lh24">支持 <font style="font-family: Arial, Helvetica, sans-serif">gif、jpg、jpeg、png、bmp</font> 格式。</div>
			</div>
			<div class="bk10"></div>
			<fieldset class="blue pad-10" id="swfupload">
				<legend>列表</legend>
				<ul class="attachment-list" id="fsUploadProgress">
				</ul>
			</fieldset>
		</div>
		<div id="att-status" class="fn-hide"></div>
		<div id="att-status-del" class="fn-hide"></div>
		<div id="att-name" class="fn-hide"></div>
		<!-- swf -->
	</div>

	<script type="text/javascript">
		seajs.use(['$','handlers','swfu', 'lm-util'],function($,handlers,SWFUpload, util){
			window.SWFUpload = SWFUpload;
			var swfu = new SWFUpload({
				flash_url:"{JS_URL}/module/multiUpload/swfupload.swf?"+Math.random(),
				upload_url:"{SITE_URL}api/upload/multi.php",
				file_post_name : "imgFile",
				post_params:{
					uUid:{$uUid},
					uMid:{$uMid},
					uAuth:'{$uAuth}',
					PHPSESSID: "<?php echo session_id(); ?>",
					"filetype_post":"gif|jpg|jpeg|png|bmp"
				},
				file_size_limit:"2048",
				file_types:"*.gif;*.jpg;*.jpeg;*.png;*.bmp",
				file_types_description:"All Files",
				file_upload_limit:"10",
				custom_settings : {progressTarget : "fsUploadProgress",cancelButtonId : "btnCancel"},
				button_image_url: "",
				button_width: 75,
				button_height: 28,
				button_placeholder_id: "buttonPlaceHolder",
				button_text_style: "",
				button_text_top_padding: 3,
				button_text_left_padding: 12,
				button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
				button_cursor: SWFUpload.CURSOR.HAND,

				file_dialog_start_handler : handlers.fileDialogStart,
				file_queued_handler : handlers.fileQueued,
				file_queue_error_handler:handlers.fileQueueError,
				file_dialog_complete_handler:handlers.fileDialogComplete,
				upload_progress_handler:handlers.uploadProgress,
				upload_error_handler:handlers.uploadError,
				upload_success_handler:handlers.uploadSuccess,
				upload_complete_handler:handlers.uploadComplete
			});
			$("#btupload").click(function(){
				swfu.startUpload();
			});
			$("#fsUploadProgress a[data-cancelId]").click(function(){
				var id = $(this).attr("data-cancelId");
				handlers.att_cancel(this,id,'upload')
			});
			if (util.browser.mozilla) {
				$(function(){
					if (location.href.indexOf("&rand=")<0) {
						location.href=location.href+"&rand="+Math.random();
					}
				});
			}
		});
	</script>
</div>
</body>
</html>